﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;

namespace HML
{
    /// <summary>
    /// 主题对象在主题文件信息
    /// </summary>
    public class SkinObjectXmlMetadata
    {
        private readonly string rootName = "Skin";
        /// <summary>
        /// 主题文件根节点
        /// </summary>
        public string RootName
        {
            get { return this.rootName; }
        }

        private readonly string assemblyName = "";
        /// <summary>
        /// 主题对象所在程序集名称
        /// </summary>
        public string AssemblyName
        {
            get { return this.assemblyName; }
        }

        private readonly string className = "";
        /// <summary>
        /// 主题对象对应名称（派生类有可能从父类获取主题）
        /// </summary>
        public string ClassName
        {
            get { return this.className; }
        }

        /// <summary>
        /// 主题对象所在程序集
        /// </summary>
        /// <param name="assemblyName">主题对象所在程序集名称</param>
        /// <param name="className">主题对象对应名称（派生类有可能从父类获取主题）</param>
        public SkinObjectXmlMetadata(string assemblyName, string className)
        {
            this.assemblyName = assemblyName;
            this.className = className;
        }

        /// <summary>
        /// 获取主题对象XPath （ "Skin/AssemblyName/ClassName" ）
        /// </summary>
        /// <returns></returns>
        public string GetSkinObjectXPath()
        {
            return this.RootName + "/" + this.AssemblyName + "/" + this.ClassName;
        }


    }
}
